;;; vcs.cfg.el --- Summary
;;; Commentary:
;;; configuration for version control systems
;;; Code:

(require 'package.cfg)

(package-install-if-absent 'magit)
(use-package magit
  :init
  (setq magit-last-seen-setup-instructions "1.4.0")
  (add-hook 'git-commit-mode-hook 'flyspell-mode)
  :bind (("C-x g" . magit-status)))

(package-install-if-absent 'helm-ls-git)
(use-package helm-ls-git)

(package-install-if-absent 'helm-ls-hg)
(use-package helm-ls-hg)

(defun my-helm-ls-git-or-hg ()
  "Try and run helm ls git or helm ls hg."
  (interactive)
  "Try to ls hg if not in a git repo."
  (if (helm-ls-git-not-inside-git-repo)
      (helm-hg-find-files-in-project)
    (helm-ls-git-ls)))

(global-set-key [f7] 'my-helm-ls-git-or-hg)



(provide 'vcs.cfg)
;;; vcs.cfg.el ends here
